﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>文本添加删除 - huatools.com</title>
    <meta charset="UTF-8">
    <meta name="keywords" content="开头添加字符,末尾添加字符,删除每行前后N个字符,删除保留包含字符行">
    <meta name="description" content="在线每行开头或末尾添加字符、删除每行前或后N个字符、删除或保留包含指定字符行、删除含有某字符的行工具。">
    <meta name="renderer" content="webkit">
    <link rel="icon" href="../img/favicon.ico"/>
    <link rel="stylesheet" href="//lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/layui/2.5.5/css/layui.min.css"/>
    <link rel="stylesheet" href="//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/codemirror/5.50.0/codemirror.min.css">
    <link rel="stylesheet" href="../css/public.min.css"/>
    <link rel="stylesheet" href="../css/tools.min.css"/>
    <link rel="stylesheet" href="index.min.css"/>
    <script src="//lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/layui/2.5.5/layui.js"></script>
    <script src="//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/jquery/3.6.0/jquery.min.js"></script>
    <script src="//lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/codemirror/5.50.0/codemirror.min.js"></script>
    <script src="//lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/codemirror/5.50.0/addon/display/placeholder.min.js"></script>
    <script src="../codemirror/addon/search/search-all.min.js"></script>
    <script src="//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-y/clipboard.js/2.0.10/clipboard.min.js"></script>
    <script src="//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/FileSaver.js/2.0.5/FileSaver.min.js"></script>
    <script src="../js/public.min.js"></script>
    <script src="index.min.js"></script>
</head>
<body>
<div class="body-div">
    <div class="menu-div">
        <ul class="layui-nav">
            <li class="layui-nav-item"><a href="/public/">JSON格式化</a></li>
            <li class="layui-nav-item"><a href="/public/xml-format/">XML格式化</a></li>
            <li class="layui-nav-item">
                <a href="javascript:">URL工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">对比工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">转换工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">分隔工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">文本工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">数字工具</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">格式化</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">加解密</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">更多</a>
                <dl class="layui-nav-child"></dl>
            </li>
            <li class="layui-nav-item skin-nav-item">
                <a href="javascript:"><i class="layui-icon layui-icon-theme"></i>换肤</a>
                <dl class="layui-nav-child"></dl>
            </li>
        </ul>
    </div>
    <div class="main-div tool-div">
        <div class="layui-container tool-container">
            <div class="layui-row btns-row">
                <div class="layui-col-md12">
                    <button type="button" class="layui-btn layui-btn-warn" id="clear">清空</button>
                    <div class="my-form" id="div1">
                        <label>前添加</label><input type="text" class="layui-input" id="head-add" title="每行前添加的字符">
                        <label>后添加</label><input type="text" class="layui-input" id="tail-add" title="每行后添加的字符">
                        <button type="button" class="layui-btn layui-btn-sm" id="add">添加</button>
                    </div>
                    <div class="my-form" id="div2">
                        <div id="div2-1">
                            <label>前N位</label><input type="number" class="layui-input" id="head-del" title="删除每行前N位字符">
                            <label>后N位</label><input type="number" class="layui-input" id="tail-del" title="删除每行后N位字符">
                        </div>
                        <div id="div2-2">
                            <input type="text" class="layui-input" id="head-str-del" placeholder="字符" title="删除每行某字符前内容"><label>前</label>
                        </div>
                        <div id="div2-3">
                            <input type="text" class="layui-input" id="tail-str-del" placeholder="字符" title="删除每行某字符后内容"><label>后</label>
                        </div>
                        <div id="div6">
                            <form class="layui-form">
                                <input type="checkbox" id="contains-str-check" title="包含字符" lay-skin="primary" lay-filter="contains-str" checked>
                            </form>
                        </div>
                        <form class="layui-form dt-select-form">
                            <select lay-filter="del" id="dt">
                                <option value="0">按位数删除</option>
                                <option value="1">字符前删除</option>
                                <option value="2">字符后删除</option>
                            </select>
                        </form>
                        <button type="button" class="layui-btn layui-btn-sm" id="del">删除</button>
                    </div>
                    <div class="my-form" id="div3">
                        <input type="text" class="layui-input" id="str" placeholder="字符">
                        <button type="button" class="layui-btn layui-btn-sm" id="del-line">删除</button>
                    </div>
                    <div class="my-form" id="div4">
                        <input type="text" class="layui-input" id="str2" placeholder="字符">
                        <button type="button" class="layui-btn layui-btn-sm" id="keep">保留</button>
                    </div>
                    <div class="my-form" id="div5">
                        <input type="text" class="layui-input" id="str3" placeholder="字符">
                        <button type="button" class="layui-btn layui-btn-sm" id="del-str">删除</button>
                    </div>
                    <button type="button" class="layui-btn layui-btn-blue" id="copy">复制</button>
                    <form class="layui-form">
                        <select lay-filter="fs" id="fs">
                            <option value="0">每行前后添加</option>
                            <option value="1">每行前后删除</option>
                            <option value="2">删除含字符行</option>
                            <option value="3">删除每行字符</option>
                            <option value="4">保留含字符行</option>
                        </select>
                    </form>
                    <div class="other-btns">
                        <button type="button" class="layui-btn layui-btn-sm right-btn" id="save" title="保存">
                            <i class="gg-download"></i>
                        </button>
                        <button type="button" class="layui-btn layui-btn-sm right-btn" id="search" title="搜索（光标激活编辑器时：Ctrl-F搜索、Ctrl-Enter查找下一个）">
                            <i class="gg-search"></i>
                        </button>
                    </div>
                </div>
            </div>
            <div class="layui-row editor-row">
                <div class="layui-col-md12">
                    <textarea id="input" placeholder="请输入文本"></textarea>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
